package com.fanshuai.springcloud.controller;

import com.fanshuai.springcloud.outer.thirdservice.BaiduService;
import com.fanshuai.springcloud.outer.thirdservice.ToutiaoService;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/third")
public class ThirdController {
    @Resource
    private BaiduService baiduService;
    @Resource
    private ToutiaoService toutiaoService;

    @GetMapping(value = "/baidu", produces = MediaType.TEXT_HTML_VALUE)
    public String baidu() {
        return baiduService.baidu();
    }

    @GetMapping(value = "/toutiao", produces = MediaType.TEXT_HTML_VALUE)
    public String toutiao() {
        return toutiaoService.toutiao();
    }
}
